import java.util.Scanner;


public class 快速排序 {
    static int[] arr;
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        arr = new int[n];
        for (int i = 0; i < n; i++) arr[i] = s.nextInt();
        qsort(0,n-1);

        for (int i = 0; i < n; i++) {
            System.out.print(arr[i]+" ");
        }
    }
    private static void qsort(int l, int r) {
        if(l>=r) return ;
        int q = arr[l];
        int i=l-1;
        int j=r+1;
        while (i<j) {
            do { i++; }while (arr[i]<q);
            do { j--; }while (arr[j]>q);
            if(i<j) {
                int tmp=arr[i];
                arr[i]=arr[j];
                arr[j]=tmp;
            }
        }
        qsort(l,j);
        qsort(j+1,r);

    }
}
